using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Collections;
/// <summary>
/// Summary description for RolBean
/// </summary>
public class RolBean : AbstractBean, IComparable<RolBean>
{

    public List<RolBean> listaRol = new List<RolBean>();

    public String codigorol;
    
    public String codigopadre;

    public String codigoperfil;

    public String editar;

    public String eliminar;

    public String crear;

    public int orden;

    public String home;
     

    public String popupflag;


    public int CompareTo(RolBean o)
    {
        return orden.CompareTo(o.orden);
    }  


    public string getPopUpflag
    {
        get { return popupflag; }
    }

    public string getChkCrear()
    {
        return (getVer() && getCrear()) ? "checked" : "";
    }

    public string getChkEditar()
    {
        return (getVer() && getEditar()) ? "checked" : "";
    }

    public string getChkEliminar()
    {
        return (getVer() && getEliminar()) ? "checked" : "";
    }

    public string getChkHome()
    {
        return (getVer() && getHome()) ? "checked" : "";
    }

    public string getChkVer()
    {
        return (getVer()) ? "checked" : "";
    }


    public bool getCrear()
    {
        return ( AbstractBean.ACTIVO == crear);
    }

    public bool getEditar()
    {
        return (AbstractBean.ACTIVO == editar );
    }

    public bool getEliminar()
    {
        return (AbstractBean.ACTIVO == eliminar);
    }

    public bool getVer()
    {
        return !"".Equals(codigoperfil) && codigoperfil != null;
    }

    public bool getHome()
    {
        return (AbstractBean.ACTIVO == home);
    }
   }
